Release 10.1A: OpenEdge Development:
Programming Interfaces
Assigning colors and fonts to a widget
You can assign colors and fonts to a widget either in the widget definition statement or at runtime after the widget is displayed. Use the
FGCOLOR,BGCOLOR,DCOLOR,PFCOLOR, andFONToptions at definition time and theFGCOLOR,BGCOLOR,DCOLOR,PFCOLOR, andFONTattributes at runtime.Progress uses the foreground color you specify for any values that appear in the widget; Progress uses the background color for the area around the widget values.
Note: For rectangle widgets, Progress uses the foreground color for the edge and the background color to fill the interior.Progress uses the font you specify for any text that appears within the widget.
Note that
FGCOLOR,BGCOLOR, andFONTapply to graphical interfaces only, andDCOLORandPFCOLORapply to character interfaces only. For more information on specifying color in character interfaces, see the "Color in character interfaces" section.The
i-clrfnt.pprocedure demonstrates how to initialize colors and fonts at widget definition and how to change them dynamically at runtime:
This procedure creates three sliders representing foreground color, background color, and font. The maximum value of each slider is determined by examining the
NUM–ENTRIESattributes of theCOLOR–TABLEandFONT–TABLEsystem handles. As you move the appropriate trackbar, the foreground color, background color, or font of the interface changes. Note that, because the procedure does not explicitly set the size of any of the sliders, Progress resizes them at runtime as you change the font.You can assign colors and fonts to all widgets, with the following exceptions:
For more information on the
COLOR–TABLEandFONT–TABLEhandles, and on theFGCOLOR,BGCOLOR,DCOLOR,PFCOLOR, andFONToptions and attributes, see the OpenEdge Development: Progress 4GL Reference . For more information on using theCOLOR–TABLEandFONT–TABLEhandles for run-time color and font management, see the "Accessing the current color and font tables" section.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |